from multiprocessing import Pool
import time

def f(name):
    #n = 1/0
    time.sleep(1)
    print('hello', name)

if __name__ == '__main__':
    pool = Pool(processes=4)
    for _ in range(5):
        result = pool.apply_async(f, args=('bob',))
        print result.successful()
    pool.close()
    pool.join()
